import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.FileInputStream;
import java.io.IOException;
 
import javax.swing.JButton;
import javax.swing.JFrame;
 
import sun.audio.AudioPlayer;
import sun.audio.AudioStream;
 
public class PlayAudio extends JFrame implements ActionListener{
	JButton button;
	boolean stop = true;
 
	public PlayAudio(){
		Container c = getContentPane();
		button = new JButton("Play");
		button.addActionListener(this);
		c.add(button);
 
		setTitle("Play audio");
		setSize(200,100);
		setVisible(true);
	}
 
	public void actionPerformed(ActionEvent e){
		try{			
			AudioPlayer p=AudioPlayer.player;
			AudioStream as =	
				new AudioStream(new FileInputStream("your file here")); 	
			p.start(as);		
		}
		catch(IOException IOE){}		
	}
 
	public static void main(String[] args){
		PlayAudio PA = new PlayAudio();
	}	
}